package com.alibaba.cloud.medicine.controller;

import com.alibaba.cloud.medicine.entity.MedSheet;
import com.alibaba.cloud.medicine.service.MedSheetService;
import com.alibaba.framework.domain.ResponseWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/medSheet")
public class MedSheetController {

    @Autowired
    private MedSheetService medSheetService;

    @PostMapping("/add")
    public ResponseWrapper<Integer> addMedSheet(@RequestBody MedSheet medSheet) {

        int i = medSheetService.add(medSheet);
        return ResponseWrapper.Success(i);
    }
}
